using System.Collections.Generic;
using System.Data.SQLite;
using System.IO;
using CompactMapper.Orm.Contracts;
using CompactMapper.Orm.Queries;

namespace CompactMapper.Orm.UnitOfWork.Mappings
{
    public interface IMappings
    {
        void RunCreate(SQLiteConnection connection);

        IEnumerable<T> RunGetAll<T>(SQLiteConnection connection)
            where T : class;

        IEnumerable<T> RunQuery<T>(SQLiteConnection connection, Query query)
            where T : class;

        void RunInsert(SQLiteConnection connection, IEnumerable<IKeyedPersistent> toInsert);

        void RunDelete<T>(SQLiteConnection connection, IKey toDelete)
            where T : class, IKeyedPersistent;

        void RunDeleteAll<T>(SQLiteConnection connection);
        MemoryStream DumpSchema();
    }
}